using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Husb.Data;
using Husb.Util;
using CentralOffice.MyTable.Data;
using CentralOffice.MyTable.BusinessActions;

using ViewEmailTable = CentralOffice.MyTable.Data.EmailDataSet.View_EmailDataTable;
using ViewEmailRow = CentralOffice.MyTable.Data.EmailDataSet.View_EmailRow;
using EmailTable = CentralOffice.MyTable.Data.EmailDataSet.emailDataTable;
using EmailRow = CentralOffice.MyTable.Data.EmailDataSet.emailRow;
using EmailBodyTale = CentralOffice.MyTable.Data.EmailDataSet.EmailBodyDataTable;
using EmailBodyRow = CentralOffice.MyTable.Data.EmailDataSet.EmailBodyRow;
namespace CentralOffice.WebClient.desktop.email
{
    public partial class menu : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LbInbox.Text =   CentralOffice.MyTable.BusinessActions.Email.GetCount(" ToId='" + ApplicationContext.ActualUserId + "' and DeleteFlag<='1' ",false).ToString();
                LbOutbox.Text =  CentralOffice.MyTable.BusinessActions.EmailBody.GetCount(" FromId='" + ApplicationContext.ActualUserId + "' and SendFlag='0'", false).ToString();
                LbSentbox.Text = CentralOffice.MyTable.BusinessActions.ViewEmail.GetCount(" FromId='" + ApplicationContext.ActualUserId + "' AND DeleteFlag='0' and SendFlag='1'", false).ToString();
                LbDelbox.Text = CentralOffice.MyTable.BusinessActions.Email.GetCount(" ToId='" + ApplicationContext.ActualUserId + "' and DeleteFlag='2' ", false).ToString();
            }
        }
    }
}
